import java.util.ArrayList;

public class shellSort {
    public static void sort(int[] nums){
        if(nums == null || nums.length == 0){
            return;
        }
//        1.计算h递增序列
        int n = nums.length;
        int k = 1;
        ArrayList<Integer> list = new ArrayList<>();
        int h;
        do{
//            h=(3^k-1)/2
            h = ((int)Math.pow(3,k)-1)/2;
            if(h>n/3){
                break;
            }
            list.add(h);
            k++;
        }while (h <= n/3);


    }
}
